layui.use(['form','layer','laydate','table','laytpl'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        laydate = layui.laydate,
        laytpl = layui.laytpl,
        table = layui.table;

    //列表
    var tableIns = table.render({
        elem: '#entityList',
        url : '/member/JsonList?introductUserId='+$("#introductUserId").val(),
        cellMinWidth : 95,
        page : true,
        height : "full-125",
        limit : 20,
        method:'post',
        limits : [10,15,20,25],
        id : "entityList",
        cols : [[
            {field: 'id', title: 'ID',align:'center',width:60},
            {field: 'phone', title: '手机号',align:'center'},
            {field: 'nickName', title: '微信昵称',align:'center',width:160},
            {field: 'headImage', title: '头像',align:'center', templet:function(d){
                return "<img src='"+d.headImage+"' style='width: 80px;height: 80px;'/>";
            },width:100},
            {field: 'name', title: '姓名',align:'center'},
            {field: 'introductUserId', title: '介绍人ID',align:'center'},
            {field: 'createTime', title: '创建时间', align:'center',width:180, templet:function(d){
                return d.createtime;
            }}
        ]]
    });

    //搜索
    $(".search_btn").on("click",function(){
        table.reload("entityList",{
            page: {
                curr: 1 //重新从第 1 页开始
            },
            where: {
                id: $("#id").val(),
                nickName: $("#nickName").val(),
                phone: $("#phone").val(),
            }
        })
    });




})